package cn.yotta.user.api.params.user;

import cn.yotta.common.api.model.IdRequest;
import cn.yotta.common.utils.param.AssertUtil;
import cn.yotta.user.api.error.UserCommonErrorCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author wyaoyao
 * @date 2023/3/16 14:25
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("用户状态改变请求参数")
public class UserStatusChangeRequest extends IdRequest {

    @ApiModelProperty(value = "操作人", hidden = true)
    private Long operatorId;

    @Override
    public void checkValid() {
        AssertUtil.nonNull(this.getId(), UserCommonErrorCode.USER_ID_IS_NULL.getCode());
        AssertUtil.nonNull(this.getOperatorId(), UserCommonErrorCode.OPERATOR_IS_NULL.getCode());
    }
}
